package com.ztesoft.web.common.vo;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.ztesoft.framework.dto.AbstractDto;

/**
 * 
 * 与IOCP同步数据VO
 * 
 * @author lin.weibin@zte.com.cn
 * @date 2015年9月10日
 * @since 1.0
 */
public class DbBaseInfoVO extends AbstractDto {
    private Integer dbBaseId;
    private String dbHostName;
    private String dbHostIp;
    private String dbHostPort;
    private String dbName;
    private String dbDesc;
    private String state;
    private String stateDesc;
    private Date stateDate;
    private String dbCategory;
    private Date createDate;

    private List<DbLinkInstanceVO> dbLinkInstance;
    public Integer getDbBaseId() {
        return dbBaseId;
    }

    public void setDbBaseId(Integer dbBaseId) {
        this.dbBaseId = dbBaseId;
    }

    public String getDbHostName() {
        return StringUtils.isBlank(dbHostName) ? dbHostName : dbHostName.trim();
    }

    public void setDbHostName(String dbHostName) {
        this.dbHostName = dbHostName;
    }

    public String getDbHostIp() {
        return StringUtils.isBlank(dbHostIp) ? dbHostIp : dbHostIp.trim();
    }

    public void setDbHostIp(String dbHostIp) {
        this.dbHostIp = dbHostIp;
    }

    public String getDbHostPort() {
        return StringUtils.isBlank(dbHostPort) ? dbHostPort : dbHostPort.trim();
    }

    public void setDbHostPort(String dbHostPort) {
        this.dbHostPort = dbHostPort;
    }

    public String getDbName() {
        return StringUtils.isBlank(dbName) ? dbName : dbName.trim();
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDbDesc() {
        return StringUtils.isBlank(dbDesc) ? dbDesc : dbDesc.trim();
    }

    public void setDbDesc(String dbDesc) {
        this.dbDesc = dbDesc;
    }

    public String getState() {
        return StringUtils.isBlank(state) ? state : state.trim();
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getDbCategory() {
        return StringUtils.isBlank(dbCategory) ? dbCategory : dbCategory.trim();
    }

    public void setDbCategory(String dbCategory) {
        this.dbCategory = dbCategory;
    }

	public Date getStateDate() {
		if (stateDate != null) 
			return (Date) stateDate.clone();
		return null;
	}

	public void setStateDate(Date stateDate) {
		if (stateDate == null) {
			this.stateDate = null;
		} else {			
			this.stateDate = (Date)stateDate.clone();
		}
	}

	public Date getCreateDate() {
		if(createDate == null) {
	        return null;
	    }
	    return (Date) createDate.clone();
	}

	public void setCreateDate(Date createDate) {
		if (createDate == null) {
			this.createDate = null;
		} else {			
			this.createDate = (Date) createDate.clone();
		}
	}

    public List<DbLinkInstanceVO> getDbLinkInstance() {
        return dbLinkInstance;
    }

    public void setDbLinkInstance(List<DbLinkInstanceVO> dbLinkInstance) {
        this.dbLinkInstance = dbLinkInstance;
    }

    public String getStateDesc() {
        return stateDesc;
    }

    public void setStateDesc(String stateDesc) {
        this.stateDesc = stateDesc;
    }

}